package com.retail.product.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品SKU实体类
 *
 * @author retail
 * @since 2024-09-25
 */
@Data
@TableName("product_sku")
@Schema(description = "商品SKU实体")
public class ProductSku {

    /**
     * SKU ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "SKU ID")
    private Long id;

    /**
     * 商品ID
     */
    @TableField("product_id")
    @Schema(description = "商品ID", example = "1")
    private Long productId;

    /**
     * SKU编码
     */
    @TableField("sku_code")
    @Schema(description = "SKU编码", example = "IPHONE15PRO-128GB-BLUE")
    private String skuCode;

    /**
     * SKU名称
     */
    @TableField("sku_name")
    @Schema(description = "SKU名称", example = "iPhone 15 Pro 128GB 蓝色")
    private String skuName;

    /**
     * 价格
     */
    @TableField("price")
    @Schema(description = "价格", example = "7999.00")
    private BigDecimal price;

    /**
     * 成本价
     */
    @TableField("cost_price")
    @Schema(description = "成本价", example = "6000.00")
    private BigDecimal costPrice;

    /**
     * 库存数量
     */
    @TableField("stock_quantity")
    @Schema(description = "库存数量", example = "100")
    private Integer stockQuantity;

    /**
     * 低库存阈值
     */
    @TableField("low_stock_threshold")
    @Schema(description = "低库存阈值", example = "10")
    private Integer lowStockThreshold;

    /**
     * 重量(kg)
     */
    @TableField("weight")
    @Schema(description = "重量(kg)", example = "0.187")
    private BigDecimal weight;

    /**
     * 体积(m³)
     */
    @TableField("volume")
    @Schema(description = "体积(m³)", example = "0.0001")
    private BigDecimal volume;

    /**
     * 状态：1-正常，0-停用
     */
    @TableField("status")
    @Schema(description = "状态：1-正常，0-停用", example = "1")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField("created_time")
    @Schema(description = "创建时间")
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    @TableField("updated_time")
    @Schema(description = "更新时间")
    private LocalDateTime updatedTime;
}